/**
  * Created by Joshua Conero(O'Uymas) on 2016/12/8 0008.
  * QQ: 957376074
  * E-mail: Brximl@163.com
  * 设置界面
  */
package org.yang
import javafx.geometry.Bounds
import scala.swing.Swing._
import scala.swing._
import scala.xml.XML
class Setting(helper: Common) {
  val conf = XML.load(helper.conf)
  val app = conf\"application"
  new Frame(){
    title = "系统设置"
    val save_btn = new Button("保存")
    contents = new BoxPanel(Orientation.Horizontal){
      border = CompoundBorder(TitledBorder(EtchedBorder, "运行信息框"), EmptyBorder(5,5,5,5))
      contents += new Label("运行目录"){
        //bounds = (10,10,10,10)
        //bounds = new Rectangle(10,10,10,10)
        //bounds = new Rectangle(400, 400, 400, 400)
        preferredSize = new Dimension(50,10)
      }
      val runtimeDir = new TextField(10){
        text = (app\"runtime"\"@dir").toString()
      }
      contents += runtimeDir
      contents += new Label("运行日志")
      val runtimeLog = new TextField(10){
        text = (app\"runtime"\"@logFile").toString()
      }
      contents += runtimeLog
      contents += save_btn
    }
    visible = true
  }
}
